import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function count(data) {
  return request({
    url: '/userInfo/countEmployee',
    method: 'get',
    data
  })
}

export function coutAge(data) {
  return request({
    url: '/userInfo/countAge',
    method: 'get',
    data
  })
}

export function getInfo(id) {
  return request({
    url: '/userInfo/getInfo',
    method: 'get',
    params: { id }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
export function updateBasic(data) {
  return request({
    url: '/userInfo/updateBasic',
    method: 'post',
    data
  })
}
export function updatePassword(data) {
  return request({
    url: '/userInfo/updatePassword',
    method: 'post',
    data
  })
}

